package com.company.genealogy.common.constant;

/**
 * @Description: TODO 系统配置常量
 * @datetime: 2025/8/1   10:56
 * @author: chenzx
 */
public class SystemConfigConstants {

    private SystemConfigConstants() {
        throw new IllegalStateException(CONST_INSTANCE_EXCEPTION_MSG);
    }

    public static final String CONST_INSTANCE_EXCEPTION_MSG = "Constant class can not be instantiated";

    /**
     * HTTP状态码：未授权
     */
    public static final int HTTP_UNAUTHORIZED = 401;

    /**
     * JSON响应内容类型
     */
    public static final String JSON_CONTENT_TYPE = "application/json;charset=UTF-8";

    /**
     * 默认错误响应模板
     */
    public static final String ERROR_RESPONSE_TEMPLATE = "{\"code\":%d,\"msg\":\"%s\",\"data\":null}";

    /**
     * Bearer Token前缀
     */
    public static final String BEARER_PREFIX = "Bearer ";

    /**
     * Authorization请求头名称
     */
    public static final String AUTHORIZATION_HEADER = "Authorization";

    /**
     * 用户缓存过期时间（分钟）
     */
    public static final long USER_CACHE_EXPIRE_MINUTES = 5;

    /**
     * 令牌类型声明
     */
    public static final String CLAIM_TOKEN_TYPE = "type";
    public static final String TOKEN_TYPE_ACCESS = "access";
    public static final String TOKEN_TYPE_REFRESH = "refresh";

}
